<template>
<div id="index-qy">
	
	<router-view/>
	
	
	<mt-tabbar v-model="selected">
		<mt-tab-item id="tabOneCom">
	    	<img slot="icon" src="../assets/100x100.png">
	    	外卖
	  	</mt-tab-item>
	  <mt-tab-item id="tabTwoCom">
	    <img slot="icon" src="../assets/100x100.png">
	    订单
	  </mt-tab-item>
	  <mt-tab-item id="tabThreeCom">
	    <img slot="icon" src="../assets/100x100.png">
	    发现
	  </mt-tab-item>
	  <mt-tab-item id="tabFourCom">
	    <img slot="icon" src="../assets/100x100.png">
	    我的
	  </mt-tab-item>
	</mt-tabbar>
	
	

</div>

</template>

<script>

export default {
  name: 'index',
  data () {
    return {
    	selected:"tabOneCom",
    	value:'',
    	result:[{
    		title:'title',
    		value:'value'
    	}]
    }
  },
  created(){
  	this.selected = this.$router.history.current.name;
  },
  mounted(){
  	$('.mint-tabbar').css('top',($(window).height() - $('.mint-tabbar').height()) + 'px');
  },
  watch:{
  	selected(r){
  		this.$router.push({ name: r})
  	}
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="less">
#index-qy{
	>.mint-tabbar{
		position: fixed;
		bottom: auto;
	}
}
</style>
